The LAMS prototype documentation and code can be found at \cite{www:lamsgooglecode}. The following sections describe the technical techniques we used to emulate the scenario described in Section \ref{sect:scenario}.

\subsection{Hosting multiple VoIP Servers}

Due to money, time, hardware and space constraints, having a host for each VoIP server was not viable. Instead we opted to run multiple VoIP servers on one machine. Using FreeBSD's \cite{www:freeBSD} ability to imprison processes within what is known as a \textit{jail}, multiple VoIP servers can run on the same machine. We choose to implement three jails on one machine because according to the specifications given by the Asterisk documentation \cite{asteriskbook}, each channel needs about 30 kHz of CPU power. The number of VoIP servers and channels required by the scenario matched the resources of the machine.

Figure \ref{fig:jailSetup} shows the logical and physical set up of hosting multiple VoIP servers.

\begin{figure}[htp]
\centering
\includegraphics[width=5in]{diagrams/jail_setup.pdf}
\caption{Hosting Multiple VoIP Servers on one machine}
\label{fig:jailSetup}
\end{figure}

A brief description of the creation of FreeBSD jails and VoIP server installation can be found in Appendix \ref{asterisk_install} and Appendix \ref{jails}.

\subsection{Multiple VoIP Clients}

Multiple VoIP clients were simulated by using SIP benchmark testing software called SIPp \cite{www:sipp}. SIPp can test different SIP scenarios. The scenarios we used were the \textit{User Agent Client} (UAC) scenario and the \textit{User Agent Scenario} (UAS). The UAC is used when a sip call is initiated and UAS is when a sip call is received. SIPp also generates RTP traffic to simulate voice packets going across the wire.

The UAC client was used to call an extension on a VoIP server which played back a pre-recorded message. Multiple SIPp processes were used to simulate the calls of multiple VoIP clients. The rate of calls and call duration were normally distribution. A description of the using the SIPp call generator application can be found in Appendix \ref{sipgeneration}.

\subsection{Injecting Telephony statistics to LAMS (Grazer 0.1)}

Extraction of network and telephony statistics from the servers, and inserting this data into the LAMS virtual world was achieved by combining a number of tools and processes together. Collectively we call these tools and processes Grazer. Grazer 0.1 achieves the following:

\begin{enumerate}
\item Calculate the telephony and server statistics that are to be monitored. 
\item Send telephony and server statistics over the network to LAMS server.
\item Interpret the statistics and inject into the LAMS virtual world. 
\end{enumerate}

The first goal is achieved with Asterisk's Manager Interface (AMI) \cite{www:asteriskami}, an interface for external applications to communicate with and manage Asterisk over TCP. AMI allows an external application to remotely access the Asterisk console. Limited system monitoring and administrative tasks can be performed through AMI. A full description of our AMI application can be found in Appendix \ref{ami}.

The second goal is achieved through the use of an existing open source network application called \textit{Ganglia Monitoring System} \cite{www:ganglia}. Ganglia is used primarily for monitoring the cluster nodes of a super computers. The idea of combining L3DGEWorld and Ganglia has previously been used by LCMON \cite{www:lcmon} which monitors Swinburne University's supercomputer \cite{www:astro}. Another concept which combines Ganglia and L3DGEWorld is to monitor next generation telescopes \cite{www:telescopes}.

A Ganglia client resides on every VoIP server that needs to be monitored. A central Ganglia server (the same machine as our LAMS server) receives updates from all the monitoring clients. Each node periodically sends an XML system snapshot over UDP to the Ganglia server.  Ganglia represents the data graphically via a web interface. Figure \ref{fig:gangliaSetup} describes our solution of sending telephony statistics to our LAMS server. \textit{gmond} and \textit{gmetad} are daemons used by Ganglia to process statistics.

\begin{figure}[htp]
\includegraphics[width=\columnwidth]{diagrams/ganglia_blockDiagram.pdf}
\caption{Ganglia Setup used to send telephony \& network statistics to a LAMS server.}
\label{fig:gangliaSetup}
\end{figure}

As Ganglia uses XML files to store system snapshots, we developed an application which interprets the XML system snapshots into update messages to the LAMS virtual world. A similar application was created in LCMON \cite{www:lcmon}. The program instructs L3DGEWorld to change the appearance, description and movement of entities in accordance with the latest snapshot data.

With Ganglia's preexisting network framework we found that it applied successfully to our LAMS scenario. One concern for the suitability of Ganglia was it's ability to send updates often enough to monitor telephony statistics. An implementation description of ganglia for LAMS can be found in Appendix \ref{ganglia}.

\subsection{Creation of LAMS Virtual World}

The LAMS Virtual World is essentially a custom game map for OpenArena, with minor modifications for L3DGEWorld.

The steps for creating a the virtual world are:
\begin{enumerate}
\item Create models and textures and entities 
\item Create and texture an OpenArena map
\item Place L3DGEWorld entities onto the map
\item Compile the map and install into L3DGEWorld
\end{enumerate}

OpenArena requires 3D models to be in the MD3 format. Milkshape 3D 1.8.3 \cite{www:milkshape} is a modelling application specifically designed for game modelling and can convert many different model formats to MD3. The LAMS entity models for the Asterisk entity and the cluster summary entity were created in Autodesk 3DS Max \cite{www:3ds} then imported into Milkshape. Milkshape was used to texture the models and convert them to the MD3 format for OpenArena. Pre-existing models from past L3DGEWorld implementations were used for the client entity and server entity.

The LAMS game map was created with GtkRadiant 1.5 \cite{www:gtkrad}. GtkRadiant is a free program which is used to create and compile maps for a number of games, including OpenArena. A L3DGEWorld extension for GtkRadiant allows entities to be placed on the map. This extension and technical instructions on map and model creation can be found at \cite{www:mapmod}.
